cmake_minimum_required(VERSION 3.5)

project(tvm_runtime C CXX)

# read config files
include(${CMAKE_CURRENT_BINARY_DIR}/config.cmake)

# Utility functions && compilation options
include(${PROJECT_SOURCE_DIR}/cmake/Function.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/Compilation.cmake)

# cmake set info
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# include directories
include_directories("${PROJECT_SOURCE_DIR}/include")

set(CMAKE_CXX_STANDARD 14)
add_definitions(-DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>)

file(GLOB RUNTIME_SRCS
    src/runtime/*.cc
    src/runtime/vm/*.cc
    src/runtime/rpc/*.cc
)
add_library(tvm_runtime SHARED ${RUNTIME_SRCS})

if (NOT USE_HOST)
    add_subdirectory("app/cpp_rpc")
endif()


